<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="description"
    content="The last list item should have number 9">
<style>
@page {
    size: 400pt 200pt;
    margin: 50pt;
}

html {
    font-family: sans-serif;
    font-size: 14pt;
    line-height: 18pt;
}

body {
    outline: thin solid rgb(0, 0, 0, 0.25);
}

ul {
    margin: 0;
}

li {
    counter-increment: li;
}

li::before {
    content: counter(li);
}
</style>
</head>

<body>
    <ul>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li><ul><li></li></ul></li>
        <li></li>
        <li></li>
        <li></li>
    </ul>
</body>

</html>
